package com.gxuwz.zhangjiahui.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxuwz.zhangjiahui.entity.Dep;
import com.gxuwz.zhangjiahui.entity.Team;
import com.gxuwz.zhangjiahui.mapper.DepMapper;
import com.gxuwz.zhangjiahui.mapper.TeamMapper;
import com.gxuwz.zhangjiahui.service.IDepService;
import com.gxuwz.zhangjiahui.service.ITeamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhangjiahui
 * @since 2021-06-20
 */
@Service
public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements ITeamService {

    @Autowired
    private TeamMapper teamMapper;

    @Override
    public Team findTeamById(Team team) {
        return teamMapper.findTeamById(team);
    }

    @Override
    public List<Team> findTeamAll() {
        return teamMapper.findTeamAll();
    }

    @Override
    public Team findTeamByStuNo(Team team) {
        return teamMapper.findTeamByStuNo(team);
    }

    @Override
    public IPage<Team> selectTeamPage(Page<Team> page, Wrapper<Team> wrapper) {
        return teamMapper.selectTeamPage(page, wrapper);
    }

    @Override
    public void addTeam(Team team) {
        teamMapper.addTeam(team);
    }

    @Override
    public void updateTeamById(Team team) {
        teamMapper.updateTeamById(team);
    }

    @Override
    public void deleteTeamById(Team team) {
        teamMapper.deleteTeamById(team);
    }
}
